Thermal MIIts

Import Libraries

import os
from pathlib import Path
import sys
import numpy as np
import scrapbook as sb
import plotly.offline as po
# Set notebook mode to work in offline
po.init_notebook_mode(connected=False)

from magnumapi.geometry.GeometryFactory import GeometryFactory
from magnumapi.geometry.roxie.CableDatabase import CableDatabase
from magnumapi.tool_adapters.roxie.RoxieToolAdapter import RoxieToolAdapter
from magnumapi.matpro.heat_capacities import calc_cv_nb3sn_nist, calc_cv_cu_nist
from magnumapi.matpro.resistivities import calc_rho_cu_nist
from magnumapi.plotting.series_plots import plot
Analysis executed on 2021-09-15 21:20:13
Loaded MagNum API version 0.0.1
Loaded Tool Adapter version 0.0.1 for ROXIE VERS.10, UPDATE 3.1, 2015

Input Parameters

model_input_rel_path = '../input/16T_rel.json'
cadata_abs_path = os.path.join(Path(os.getcwd()).parent.absolute(), 'input/roxieold_2.cadata')
peak_field = 15
L_mag = 0.1
R_EE = 1
full_output =  True
# Parameters
full_output = "True"

Adiabatic Hot Spot Estimation

Considering a superconducting cable in adiabatic conditions, the heat balance equation reads

\[ J^2(t) \rho(B, T) dt = C_\text{v}(B, T) dT, \]

where \(B\) is the magnetic field, \(T\) is the temperature, \(J(t)\) is the current density, \(\rho(B, T)\) is the copper resistivity, \(C_\text{v}(B, T)\) is the cable volumetric heat capacity.

After expanding the current density \(J(t) = \frac{I(t)}{A_\text{copper}}\), where \(A_\text{copper}\) is the copper cross-section, we obtain

\[ \frac{I^2(t)}{A^2_\text{copper}} \rho(B, T) dt = C_\text{v}(B, T) dT. \]

Finally, the temperature evolution is given by

\[ T_\text{end} = T_0 + \int_{t=0}^{t_\text{end}} \frac{I^2(t)}{A^2_\text{copper} C_\text{v}(B, T)} \rho(B, T) d \tau. \]

Magnet Parameters

cadata = CableDatabase.read_cadata(cadata_abs_path)
geometry = GeometryFactory.init_with_json(model_input_rel_path, cadata)
geometry.build_blocks()
roxie_df = geometry.to_roxie_df()
roxie_df
no type nco radius phi alpha current condname n1 n2 imag turn
0 1 1 4 25.00 0.57294 -1.177972e-16 13500 16TIL9 2 20 0 0
1 2 1 5 25.00 23.00000 2.600000e+01 13500 16TIL9 2 20 0 0
2 3 1 2 25.00 50.80000 4.700000e+01 13500 16TIL9 2 20 0 0
3 4 1 2 25.00 65.50000 6.600000e+01 13500 16TIL9 2 20 0 0
4 5 1 7 39.00 0.36728 -1.177972e-16 13500 16TIL9 2 20 0 0
5 6 1 10 39.00 26.00000 3.500000e+01 13500 16TIL9 2 20 0 0
6 7 1 2 39.00 61.00000 5.400000e+01 13500 16TIL9 2 20 0 0
7 8 1 18 53.00 0.27026 -1.139973e-16 13500 16TOL8 2 20 0 0
8 9 1 9 53.00 31.30000 3.000000e+01 13500 16TOL8 2 20 0 0
9 10 1 2 53.00 57.00000 5.000000e+01 13500 16TOL8 2 20 0 0
10 11 1 28 67.45 0.21236 -1.139973e-16 13500 16TOL8 2 20 0 0
11 12 1 11 67.45 37.90000 3.000000e+01 13500 16TOL8 2 20 0 0
I_0 = geometry.blocks[0].block_def.current
f_Cu_Sc = geometry.blocks[0].strand_def.f_cu_nocu
T_0 = geometry.blocks[0].conductor_def.temp_ref
RRR = geometry.blocks[0].strand_def.rrr
d_strand = geometry.blocks[0].strand_def.d_strand * 1e-3
ns = geometry.blocks[0].cable_def.n_s

f_Cu = f_Cu_Sc / (1 + f_Cu_Sc)
A_copper = f_Cu * ns * np.pi * d_strand ** 2 / 4

B_peak = abs(peak_field)
f_B = B_peak / I_0
tau = L_mag / R_EE

Current Profile

n_time = 10000
t = 1 / np.geomspace(1, 100000, num=n_time)[::-1]
I = I_0 * np.exp(-t / tau)
if full_output:
    plot(t, I, xlabel='t, [s]', ylabel='I, [A]')

Material Properties

  • Copper resistivity

if full_output:
    T = np.linspace(T_0, 300, 100)
    rho_cu = calc_rho_cu_nist(T, B_peak, RRR)

    plot(T, rho_cu, xlabel='T, [K]', ylabel='rho, [ohm * m]')
  • Copper heat capacity

if full_output:
    T = np.linspace(T_0, 300, 100)
    cv_cu = calc_cv_cu_nist(T)

    plot(T, cv_cu, xlabel='T, [K]', ylabel='Cv, [J/(m^3 K)]')
  • Nb3Sn heat capacity

if full_output:
    T = np.linspace(T_0, 300, 100)
    cv_nb3sn = calc_cv_nb3sn_nist(T, B_peak)

    plot(T, cv_nb3sn, xlabel='T, [K]', ylabel='Cv, [J/(m^3 K)]')

Hot Spot Estimation

T = [T_0]
for i in range(n_time - 1):
    dt = t[i + 1] - t[i]
    B = f_B * I[i]
    rho_cu = calc_rho_cu_nist(T[i], B, RRR)[0]
    cv_cu = calc_cv_cu_nist(T[i])
    cv_nb3sn = calc_cv_nb3sn_nist(T[i], B)[0]
    cv = f_Cu * cv_cu + (1 - f_Cu) * cv_nb3sn
    
    T.append(T[i] + dt * (I[i] / A_copper)**2 * rho_cu / cv)

if full_output:
    plot(t, T, xlabel='t, [s]', ylabel='T, [K]')

Save Figures of Merit as an Output

sb.glue('model_results', data={'T_hotspot': T[-1]}, encoder='json')